package com.tiger.cloud.enums;

import com.tiger.cloud.common.mybatis.handler.CodeEnum;

/**
 * 楼层
 */
public enum CustomerFloorType implements CodeEnum<CustomerFloorType> {

	residence(0, "住宅"),office (1, "办公楼"),shop(2, "商铺"),workshop(3, "厂房"),mountain_forest(4, "山林"), fish_pond(5, "鱼塘"), mine(6, "矿山"), other(7, "其它");

	private int code;
	private String desc;
	

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static CustomerFloorType getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (CustomerFloorType enumm : CustomerFloorType.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
	
	private CustomerFloorType(int code, String desc) {
		this.code = code;
		this.desc=desc;
	}

	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
